package com.crazy.bookstore.exception;

/**
 * @author: 卢辉宇
 * @date: 2022/12/27 14:04
 * @description:
 */
public enum ExceptionEnum {
    /*枚举的类别*/
    UNKNOWN_ERROR(9999,"未知异常"),
    VERIFY_CODE_ERROR(10001,"验证码错误"),
    USERNAME_EXISTED(10002,"用户已存在"),
    USERNAME_NOT_EXISTED(10003,"用户不存在"),
    PASSWORD_ERROR(10004,"密码错误"),
    NOT_FIND_IMG(10005,"没找到封面图片"),
    NEED_ADMIN(10006,"你不是管理员"),

    /*后续要增加的异常。。。*/

    SYSTEM_ERROR(20000,"系统异常");

    /*字段*/
    private Integer code;
    private String msg;

    /*构造方法*/
    ExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
